Install LAME MP3 Plugin for Audacity 1.3 Fixlet

Target OS: Windows
Location: C:\Program Files (x86)\Audacity 1.3 Beta (Unicode)\Plug-Ins​
Audacity Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Audacity 1.3 Beta (Unicode)_is1​
Audacity Config File: Users\<user name>\AppData\Roaming\Audacity\audacity.cfg
Note: lame_enc.dll does not have a file version number, so version checking is done through size/date/sha1, This Fixlet was built using lame_enc.dll version 3.98.2
 
 

Relevance 1:

 
(name of it = "WinXP" OR name of it = "WinXP-2003" OR (name of it = "WinVista" AND product type of it = nt workstation product type AND NOT x64 of it) OR (name of it = "WinVista" AND product type of it = nt workstation product type AND x64 of it) OR (name of it = "Win7" AND NOT x64 of it) OR (name of it = "Win7" AND x64 of it)) of operating system​
 
 

Relevance 2:

 
exists keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry​
 

Relevance 3:

exists value "InstallLocation" of keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry​
 
 

Relevance 4:

exists folder (value "InstallLocation" of keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry as string & "Plug-Ins\")​
 
 

Relevance 5:

 
// This relevance is a bit of overkill, but a work around because of the LAME MP3 DLL not having proper version numbering.
(not exists file (value "InstallLocation" of keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry as string & "Plug-Ins\lame_enc.dll")) OR (not(((380928 = size of it AND "Fri, 28 Nov 2008 08:32:56 -0400" as time = modification time of it AND "755b6e39607e45eeb3780a18edab580e9d2be4af" = sha1 of it) of file (value "InstallLocation" of keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry as string & "Plug-Ins\lame_enc.dll"))))​
 
 
 

Action:

 
download http://tem.server.organization.tld:52311/Uploads/3880c8f15b88a4e247a0f2a275061b04eab9727d/lame_encdll.tmp
continue if {(size of it = 192066 AND sha1 of it = "3880c8f15b88a4e247a0f2a275061b04eab9727d") of file "lame_encdll.tmp" of folder "__Download"}
 
//delete any old copy still in download folder
delete "__Download\lame_enc.dll"
//extract newly downloaded copy
extract lame_encdll.tmp
//wait __Download\lame_enc.dll
 
//Verify this is the proper version of lame_enc.dll - 3.98.2
continue if {(380928 = size of it AND "Fri, 28 Nov 2008 08:32:56 -0400" as time = modification time of it AND "755b6e39607e45eeb3780a18edab580e9d2be4af" = sha1 of it) of file "lame_enc.dll" of folder "__Download"}
 
//Delete any old copies of the lame_enc.dll
delete "{value "InstallLocation" of keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry as string & "Plug-Ins\lame_enc.dll"}"
 
//Copy new lame_enc.dll to the Audacity Plug-Ins Directory
copy __Download\lame_enc.dll "{value "InstallLocation" of keys whose (value "DisplayName" of it as string as lowercase contains "Audacity 1.3" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of registry as string & "Plug-Ins\lame_enc.dll"}"​
 
 

References:

 
http://manual.audacityteam.org/man/FAQ:Installation_and_Plug-Ins#How_do_I_download_and_install_the_LAME_MP3_encoder.3F​
http://lame.buanzo.com.ar/libmp3lame-win-3.98.2.zip​
http://r.virscan.org/f59f1c472525a2d3682413de815d196d​